<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: GPIO Peripheral driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__gpio__driver.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">GPIO Peripheral driver<div class="ingroups"><a class="el" href="group__gpio.html">General-Purpose Input/Output (GPIO)</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Collaboration diagram for GPIO Peripheral driver:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<center><table><tr><td><div class="center"><iframe scrolling="no" frameborder="0" src="group__gpio__driver.svg" width="360" height="52"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</td></tr></table></center>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structgpio__pin__config__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a></td></tr>
<tr class="memdesc:structgpio__pin__config__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">The GPIO pin configuration structure.  <a href="group__gpio__driver.html#structgpio__pin__config__t">More...</a><br /></td></tr>
<tr class="separator:structgpio__pin__config__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gada41ca0a2ce239fe125ee96833e715c0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a> { <br />
&#160;&#160;<a class="el" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">kGPIO_DigitalInput</a> = 0U, 
<br />
&#160;&#160;<a class="el" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9">kGPIO_DigitalOutput</a> = 1U
<br />
 }<tr class="memdesc:gada41ca0a2ce239fe125ee96833e715c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIO direction definition.  <a href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gada41ca0a2ce239fe125ee96833e715c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Configuration</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp254f642527b45bc260048e30704edb39"></a>Introduce the FGPIO feature. The FGPIO features are only support on some of kinetis chips. The FGPIO registers are aliased to the IOPORT interface. Accesses via the IOPORT interface occur in parallel with any instruction fetches and will therefore complete in a single cycle. This aliased Fast GPIO memory map is called FGPIO. </p>
</td></tr>
<tr class="memitem:ga0793a4e8cb6e746485012da3e487db53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53">GPIO_PinInit</a> (GPIO_Type *base, uint32_t pin, const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *config)</td></tr>
<tr class="memdesc:ga0793a4e8cb6e746485012da3e487db53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a GPIO pin used by the board.  <a href="#ga0793a4e8cb6e746485012da3e487db53">More...</a><br /></td></tr>
<tr class="separator:ga0793a4e8cb6e746485012da3e487db53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga901f0041b94f3d48cad3f1bde778d1ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad">FGPIO_PinInit</a> (FGPIO_Type *base, uint32_t pin, const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *config)</td></tr>
<tr class="memdesc:ga901f0041b94f3d48cad3f1bde778d1ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a FGPIO pin used by the board.  <a href="#ga901f0041b94f3d48cad3f1bde778d1ad">More...</a><br /></td></tr>
<tr class="separator:ga901f0041b94f3d48cad3f1bde778d1ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Output Operations</h2></td></tr>
<tr class="memitem:ga5677a2c3b14f5e9f034edbbd5b429c1d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga5677a2c3b14f5e9f034edbbd5b429c1d">GPIO_WritePinOutput</a> (GPIO_Type *base, uint32_t pin, uint8_t output)</td></tr>
<tr class="memdesc:ga5677a2c3b14f5e9f034edbbd5b429c1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple GPIO pins to the logic 1 or 0.  <a href="#ga5677a2c3b14f5e9f034edbbd5b429c1d">More...</a><br /></td></tr>
<tr class="separator:ga5677a2c3b14f5e9f034edbbd5b429c1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga2f8a8be69355039abd8b1ddf2a236f4c">GPIO_SetPinsOutput</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple GPIO pins to the logic 1.  <a href="#ga2f8a8be69355039abd8b1ddf2a236f4c">More...</a><br /></td></tr>
<tr class="separator:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga3ac4a7dccb5285b2926f152c3ff12af9">GPIO_ClearPinsOutput</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple GPIO pins to the logic 0.  <a href="#ga3ac4a7dccb5285b2926f152c3ff12af9">More...</a><br /></td></tr>
<tr class="separator:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2d7bb4c2c2e1eb3b455451beeb42717e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga2d7bb4c2c2e1eb3b455451beeb42717e">GPIO_TogglePinsOutput</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga2d7bb4c2c2e1eb3b455451beeb42717e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverses current output logic of the multiple GPIO pins.  <a href="#ga2d7bb4c2c2e1eb3b455451beeb42717e">More...</a><br /></td></tr>
<tr class="separator:ga2d7bb4c2c2e1eb3b455451beeb42717e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9387e234a9bdb827b9e7e6b9bf366ea6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga9387e234a9bdb827b9e7e6b9bf366ea6">FGPIO_WritePinOutput</a> (FGPIO_Type *base, uint32_t pin, uint8_t output)</td></tr>
<tr class="memdesc:ga9387e234a9bdb827b9e7e6b9bf366ea6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple FGPIO pins to the logic 1 or 0.  <a href="#ga9387e234a9bdb827b9e7e6b9bf366ea6">More...</a><br /></td></tr>
<tr class="separator:ga9387e234a9bdb827b9e7e6b9bf366ea6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5222663f54c421779ed9db3b03b974f2"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga5222663f54c421779ed9db3b03b974f2">FGPIO_SetPinsOutput</a> (FGPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga5222663f54c421779ed9db3b03b974f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple FGPIO pins to the logic 1.  <a href="#ga5222663f54c421779ed9db3b03b974f2">More...</a><br /></td></tr>
<tr class="separator:ga5222663f54c421779ed9db3b03b974f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0fa54b2ea5eb56e527dca6b134701efc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga0fa54b2ea5eb56e527dca6b134701efc">FGPIO_ClearPinsOutput</a> (FGPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga0fa54b2ea5eb56e527dca6b134701efc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple FGPIO pins to the logic 0.  <a href="#ga0fa54b2ea5eb56e527dca6b134701efc">More...</a><br /></td></tr>
<tr class="separator:ga0fa54b2ea5eb56e527dca6b134701efc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76fe687b3a1722c451a27cdeb4740406"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga76fe687b3a1722c451a27cdeb4740406">FGPIO_TogglePinsOutput</a> (FGPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga76fe687b3a1722c451a27cdeb4740406"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reverses current output logic of the multiple FGPIO pins.  <a href="#ga76fe687b3a1722c451a27cdeb4740406">More...</a><br /></td></tr>
<tr class="separator:ga76fe687b3a1722c451a27cdeb4740406"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Input Operations</h2></td></tr>
<tr class="memitem:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gaf8d77b6a1daf18087dbc6c0814b2ed97">GPIO_ReadPinInput</a> (GPIO_Type *base, uint32_t pin)</td></tr>
<tr class="memdesc:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current input value of the whole GPIO port.  <a href="#gaf8d77b6a1daf18087dbc6c0814b2ed97">More...</a><br /></td></tr>
<tr class="separator:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac0aa5fa3ec465a2d92e23870f399e978"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gac0aa5fa3ec465a2d92e23870f399e978">FGPIO_ReadPinInput</a> (FGPIO_Type *base, uint32_t pin)</td></tr>
<tr class="memdesc:gac0aa5fa3ec465a2d92e23870f399e978"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current input value of the whole FGPIO port.  <a href="#gac0aa5fa3ec465a2d92e23870f399e978">More...</a><br /></td></tr>
<tr class="separator:gac0aa5fa3ec465a2d92e23870f399e978"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Interrupt</h2></td></tr>
<tr class="memitem:ga911ee36033873e98cb47f19be77c130a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga911ee36033873e98cb47f19be77c130a">GPIO_GetPinsInterruptFlags</a> (GPIO_Type *base)</td></tr>
<tr class="memdesc:ga911ee36033873e98cb47f19be77c130a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads whole GPIO port interrupt status flag.  <a href="#ga911ee36033873e98cb47f19be77c130a">More...</a><br /></td></tr>
<tr class="separator:ga911ee36033873e98cb47f19be77c130a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad7f69cb09309c9dcd71acd30563a30d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gaad7f69cb09309c9dcd71acd30563a30d">GPIO_ClearPinsInterruptFlags</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:gaad7f69cb09309c9dcd71acd30563a30d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears multiple GPIO pins' interrupt status flag.  <a href="#gaad7f69cb09309c9dcd71acd30563a30d">More...</a><br /></td></tr>
<tr class="separator:gaad7f69cb09309c9dcd71acd30563a30d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9715105f63a1f7cccfcd8972e59ea95a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga9715105f63a1f7cccfcd8972e59ea95a">FGPIO_GetPinsInterruptFlags</a> (FGPIO_Type *base)</td></tr>
<tr class="memdesc:ga9715105f63a1f7cccfcd8972e59ea95a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the whole FGPIO port interrupt status flag.  <a href="#ga9715105f63a1f7cccfcd8972e59ea95a">More...</a><br /></td></tr>
<tr class="separator:ga9715105f63a1f7cccfcd8972e59ea95a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga175ca244321b5433456ac5d74ff1a1a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga175ca244321b5433456ac5d74ff1a1a9">FGPIO_ClearPinsInterruptFlags</a> (FGPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga175ca244321b5433456ac5d74ff1a1a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the multiple FGPIO pins' interrupt status flag.  <a href="#ga175ca244321b5433456ac5d74ff1a1a9">More...</a><br /></td></tr>
<tr class="separator:ga175ca244321b5433456ac5d74ff1a1a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Usage Information</h2>
<p>This section describes the programming interface of the GPIO Peripheral driver. The GPIO driver configures GPIO module and provides the functional interface to build the GPIO application.</p>
<h1><a class="anchor" id="GPIOFunGrps"></a>
Function groups</h1>
<h2><a class="anchor" id="GPIOConfig"></a>
GPIO Configuration</h2>
<p>This function group configures the the GPIO pin.</p>
<h2><a class="anchor" id="GPIOOut"></a>
GPIO Output Operations</h2>
<p>This function group sets the GPIO pin output, such as write, set, clear, and toggle.</p>
<h2><a class="anchor" id="GPIOinput"></a>
GPIO Input Operations</h2>
<p>This function reads the GPIO pin value.</p>
<h2><a class="anchor" id="GPIOinterrupt"></a>
GPIO Interrupt</h2>
<p>This function group checks or clears the GPIO pin interrupt.</p>
<h1><a class="anchor" id="GPIOTpyUC"></a>
Typical use case</h1>
<h2><a class="anchor" id="GPIOOutOps"></a>
Output Operation</h2>
<div class="fragment"><div class="line"><span class="comment">/* Output pin configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> led_config =</div><div class="line">{</div><div class="line">    kGpioDigitalOutput,</div><div class="line">    1,</div><div class="line">};</div><div class="line"><span class="comment">/*  Sets the configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53">GPIO_PinInit</a>(GPIO_LED, LED_PINNUM, &amp;led_config);</div></div><!-- fragment --><h2><a class="anchor" id="GPIOInOps"></a>
Input Operation</h2>
<div class="fragment"><div class="line"><span class="comment">/*  Input pin configuration */</span></div><div class="line"><a class="code" href="group__port__driver.html#ga13366bbc894a0d4d32af0b24df7047a5">PORT_SetPinInterruptConfig</a>(BOARD_SW2_PORT, BOARD_SW2_GPIO_PIN, <a class="code" href="group__port__driver.html#gga18b2add7e164a5dfa5c00832f857a1f6afe8f52eaca9af2ce2087a2991f50c463">kPORT_InterruptFallingEdge</a>);</div><div class="line">NVIC_EnableIRQ(BOARD_SW2_IRQ);    </div><div class="line"><a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> sw1_config =</div><div class="line">{</div><div class="line">    kGpioDigitalInput,</div><div class="line">    0,</div><div class="line">};</div><div class="line"><span class="comment">/* Sets the input pin configuration */</span></div><div class="line"><a class="code" href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53">GPIO_PinInit</a>(GPIO_SW1, SW1_PINNUM, &amp;sw1_config);</div></div><!-- fragment --> <hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structgpio__pin__config__t" id="structgpio__pin__config__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct gpio_pin_config_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>The GPIO pin configuration structure. </p>
<p>Every pin can only be configured as either output pin or input pin at a time. If configured as a input pin, then leave the outputConfig unused Note : In some cases, the corresponding port property should be configured in advance cwith the <a class="el" href="group__port__driver.html#gaa699e1a4206ade9a2c465ea360fc3ebb" title="Sets the port PCR register. ">PORT_SetPinConfig()</a> </p>
</div><table class="fieldtable">
<tr><th colspan="3">Data Fields</th></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ae25321cd13f1ed5254f722b0f3c64242"></a>uint8_t</td>
<td class="fieldname">
outputLogic</td>
<td class="fielddoc">
<p>Set default output logic, no use in input </p>
</td></tr>
<tr><td class="fieldtype">
<a class="anchor" id="ab0b8ce6b7e068de24659c0c382fa481c"></a><a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a></td>
<td class="fieldname">
pinDirection</td>
<td class="fielddoc">
<p>gpio direction, input or output </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gada41ca0a2ce239fe125ee96833e715c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>GPIO direction definition. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4"></a>kGPIO_DigitalInput&#160;</td><td class="fielddoc">
<p>Set current pin as digital input </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9"></a>kGPIO_DigitalOutput&#160;</td><td class="fielddoc">
<p>Set current pin as digital output </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga175ca244321b5433456ac5d74ff1a1a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FGPIO_ClearPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears the multiple FGPIO pins' interrupt status flag. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>FGPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0fa54b2ea5eb56e527dca6b134701efc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void FGPIO_ClearPinsOutput </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple FGPIO pins to the logic 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>FGPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga9715105f63a1f7cccfcd8972e59ea95a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t FGPIO_GetPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the whole FGPIO port interrupt status flag. </p>
<p>If a pin is configured to generate the DMA request, the corresponding flag is cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to that flag. If configured for a level sensitive interrupt that remains asserted, the flag is set again immediately.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">Current</td><td>FGPIO port interrupt status flags, for example, 0x00010001 means the pin 0 and 17 have the interrupt. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga901f0041b94f3d48cad3f1bde778d1ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FGPIO_PinInit </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes a FGPIO pin used by the board. </p>
<p>To initialize the FGPIO driver, define a pin configuration, either input or output, in the user file. Then, call the <a class="el" href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad" title="Initializes a FGPIO pin used by the board. ">FGPIO_PinInit()</a> function.</p>
<p>This is an example to define an input pin or output pin configuration: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;// Define a digital input pin configuration,</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;gpio_pin_config_t config =</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;{</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  kGPIO_DigitalInput,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  0,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;}</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;//Define a digital output pin configuration,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;gpio_pin_config_t config =</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;{</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  kGPIO_DigitalOutput,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  0,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;}</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>FGPIO port pin number </td></tr>
    <tr><td class="paramname">config</td><td>FGPIO pin configuration pointer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac0aa5fa3ec465a2d92e23870f399e978"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t FGPIO_ReadPinInput </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the current input value of the whole FGPIO port. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>FGPIO pin's number </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FGPIO</td><td>port input value<ul>
<li>0: corresponding pin input low logic level.</li>
<li>1: corresponding pin input high logic level. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5222663f54c421779ed9db3b03b974f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void FGPIO_SetPinsOutput </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple FGPIO pins to the logic 1. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>FGPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga76fe687b3a1722c451a27cdeb4740406"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void FGPIO_TogglePinsOutput </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reverses current output logic of the multiple FGPIO pins. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>FGPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga9387e234a9bdb827b9e7e6b9bf366ea6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void FGPIO_WritePinOutput </td>
          <td>(</td>
          <td class="paramtype">FGPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple FGPIO pins to the logic 1 or 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>FGPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>FGPIO pin's number </td></tr>
    <tr><td class="paramname">output</td><td>FGPIOpin output logic level.<ul>
<li>0: corresponding pin output low logic level.</li>
<li>1: corresponding pin output high logic level. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaad7f69cb09309c9dcd71acd30563a30d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GPIO_ClearPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clears multiple GPIO pins' interrupt status flag. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3ac4a7dccb5285b2926f152c3ff12af9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_ClearPinsOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple GPIO pins to the logic 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga911ee36033873e98cb47f19be77c130a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t GPIO_GetPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads whole GPIO port interrupt status flag. </p>
<p>If a pin is configured to generate the DMA request, the corresponding flag is cleared automatically at the completion of the requested DMA transfer. Otherwise, the flag remains set until a logic one is written to that flag. If configured for a level sensitive interrupt that remains asserted, the flag is set again immediately.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">Current</td><td>GPIO port interrupt status flag, for example, 0x00010001 means the pin 0 and 17 have the interrupt. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0793a4e8cb6e746485012da3e487db53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GPIO_PinInit </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes a GPIO pin used by the board. </p>
<p>To initialize the GPIO, define a pin configuration, either input or output, in the user file. Then, call the <a class="el" href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53" title="Initializes a GPIO pin used by the board. ">GPIO_PinInit()</a> function.</p>
<p>This is an example to define an input pin or output pin configuration: </p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;// Define a digital input pin configuration,</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;gpio_pin_config_t config =</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;{</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;  kGPIO_DigitalInput,</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;  0,</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;}</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;//Define a digital output pin configuration,</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;gpio_pin_config_t config =</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;{</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;  kGPIO_DigitalOutput,</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  0,</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;}</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO port pin number </td></tr>
    <tr><td class="paramname">config</td><td>GPIO pin configuration pointer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf8d77b6a1daf18087dbc6c0814b2ed97"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t GPIO_ReadPinInput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reads the current input value of the whole GPIO port. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO pin's number </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">GPIO</td><td>port input value<ul>
<li>0: corresponding pin input low logic level.</li>
<li>1: corresponding pin input high logic level. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2f8a8be69355039abd8b1ddf2a236f4c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_SetPinsOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple GPIO pins to the logic 1. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2d7bb4c2c2e1eb3b455451beeb42717e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_TogglePinsOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reverses current output logic of the multiple GPIO pins. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pins' numbers macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5677a2c3b14f5e9f034edbbd5b429c1d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_WritePinOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the output level of the multiple GPIO pins to the logic 1 or 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer(GPIOA, GPIOB, GPIOC, etc.) </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO pin's number </td></tr>
    <tr><td class="paramname">output</td><td>GPIO pin output logic level.<ul>
<li>0: corresponding pin output low logic level.</li>
<li>1: corresponding pin output high logic level. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
